package com.mapper;

import com.entity.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookMapper {
    void insertBook(Book book);
    void deleteBookById(Integer id);
    void updateBook(Book book);
    Book selectBookById(Integer id);
    Book selectBookByName(String name);
    List<Book> selectBook();
    List<Book> selectPageBook(@Param("pageNum")Integer pageNum,
                              @Param("pageSize")Integer pageSize,
                              @Param("query") String query,
                              @Param("value") String value);
    int countRowsByCategoryId(Integer categoryId);
    List<Book> recommendBooks();
    List<Book> hotSellBooks();
    List<Book> newBooks();
    List<Book> newHotSellBooks();
    List<Book> selectBookByCategory(@Param("pageNum")Integer pageNum,
                                    @Param("pageSize")Integer pageSize,
                                    @Param("fid")Integer fid,
                                    @Param("sid")Integer sid);

}
